<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="zh-CN">

<head>
	<meta charset="utf-8" />
	<title>{$shop_info.title}-{$web_name}</title>
	<meta name="Keywords" content="{$shop_info.keywords}" />
	<meta name="Description" content="{$shop_info.description}" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
	<meta name="format-detection" content="telephone=no">

	<tc_include file="Public:head" />
	<script type="text/javascript">
        function getCountDown(timestamp,id){
            setInterval(function(){
                var nowTime = new Date();
                var endTime = new Date(timestamp * 1000);

                var t = endTime.getTime() - nowTime.getTime();
                var hour=Math.floor(t/1000/60/60%24);
                var min=Math.floor(t/1000/60%60);
                var sec=Math.floor(t/1000%60);

                if (hour < 10) {
                    hour = "0" + hour;
                }
                if (min < 10) {
                    min = "0" + min;
                }
                if (sec < 10) {
                    sec = "0" + sec;
                }
                var countDownTime = hour + ":" + min + ":" + sec;
                $("#"+id).html(countDownTime);

            },1000);
        }
	</script>

</head>

<body class="pace-done">
<div id="bg" class="bg" style="display: none;"></div>
<tc_include file="Public:nav" />
<php>$rs_type=shop_type($shop_info['id']);</php>
<!-- 内容 -->
<link rel="stylesheet" href="__TMPL__Home/Shop/css/goods.css" />
<link rel="stylesheet" href="__TMPL__Home/Crowdfunding/css/crowdfunding.css" />
<div class="w1210">

	<div class="breadcrumb clearfix">
		<foreach name="bread" item="v">
			<neq name="key" value="0"><span class="crumbs-arrow">&gt;</span></neq>
			<a href="{$v.href}" class="index">{$v.name}</a>
		</foreach>
		<a href="javascript:;" class="index">{$shop_info.title}</a>

	</div>

	<!-- 商品详细信息 -->
	<div class="goods-info" style="position: relative;">
		<!-- 商品图片以及相册 _star-->
		<php>if($rs_type['tuan']==1){</php><img src="/static/images/tuan.png" alt="此商品参与团购" style="position: absolute;z-index: 999;width: auto; height: auto;left:6px;"/><php>}</php>
		<div id="preview" class="preview">
			<!-- 商品相册容器 -->
			<div class="goodsgallery"></div>
			<!--相册 END-->

			<div class="goods-gallery-bottom">
				<php>if($rsshopinfo_status==1){</php>
				<a href="javascript:void(0);" class="goods-col2 fr collect-goods" data-goods-id="{$shop_info['id']}">
					<i></i>
					<span>已收藏</span>
				</a>
				<php>}else{</php>
				<a href="javascript:void(0);" class="goods-col fr collect-goods" data-goods-id="{$shop_info['id']}">
					<i></i>
					<span>收藏商品</span>
				</a>
				<php>}</php>

			</div>


		</div>
		<!-- 商品图片以及相册 _end-->
		<!-- 商品详细信息 _star-->
		<div class="detail-info">
			<form action="" method="post" name="" id="">

				<!-- 商品名称 -->
				<h1 class="goods-name SZY-GOODS-NAME"><php>if($rs_type['coupon']==1){</php><em style="background-image: url('/static/images/yhq.png');padding: 0 5px 0 11px;color: #fff;background-size: 100% 100%;margin-right: 5px;">优惠券</em><php>}</php>{$shop_info.title}</h1>
				<notempty name="shop_content_info.story_title"><p><a href="{:U('shop/store',array('id'=>$shop_info['id']))}" style="color:red">{$shop_content_info.story_title}</a></p></notempty>
				<div class="goods-price">

					<!-- 商品不同的价格 -->
					<!--<div class="show-price">
						<span class="price">市场价</span>
						<font class="market-price SZY-MARKET-PRICE">￥{$shop_info.oprice}</font>
					</div>-->
					<!-- 商品市场价 _end -->
					<!-- 销量及评价 _start -->
					<div class="goods-info-other">

						<div class="item sale">
							<p>累计销量</p>
							<em class="second-color">{$shop_info.sale_num}</em>
						</div>

						<div class="item evaluate">
							<p>用户评价</p>
							<a id="evaluate_num" href="#goods_evaluate" class="second-color">{$shop_info.evaluation_count}</a>
						</div>
						<php>if(($shop_info['redenvelope']>0&&$shop_info['envelope_type']==0)||($shop_info['envelope_product_id']>0&&$shop_info['envelope_type']==1)){</php>
						<style type="text/css">
							.daiyan{padding: 0px 0px 0 9px!important;margin-top: 7px!important;background: #e9394e;border-radius: 12px;height: 25px;line-height: 25px;}
							.daiyan_tip{background: url(/themes/wnsc/Home/Shop/images/wenhao.png) center;text-indent: -9999px;display: block!important;width: 25px!important;height: 25px!important;background-size: 25px;margin-top: 7px!important;}
							.daiyan_click{background: #ffbc00;position: relative; border-radius: 25px;padding: 9px;width: 25px;display: block;height: 25px;top: -9px;float: right;text-align: center;line-height: 14px;}
						</style>
						<div class="freight">

							<div class="dd">
								<div class="post-age" style="float: right;">
									<php>
										if($web_daiyan>=$shop_info['redenvelope']){
										$shop_info['redenvelope']=round($shop_info['redenvelope']/$shop_info['price'] * 100 , 2) . "％";
										}else{
										$shop_info['redenvelope']='￥'.$shop_info['redenvelope'];
										}
										$envelope_product=get_shop_info($shop_info['envelope_product_id']);
									</php>
									<php>if($shop_info['tuanselect']==0){</php>
									<php>if($shop_info['envelope_type']==0){</php>
									<span class="daiyan">
															{$shop_info['redenvelope']}&nbsp;
															<em class="daiyan_click">代言红包</em>
														</span>
									<php>}else{</php>
									<span class="daiyan">
														<a href="{:U('shop/index',array('id'=>$shop_info['envelope_product_id']))}" style="line-height: 28px;color: #fff;">{$envelope_product.title}</a>
															<em class="daiyan_click">代言礼品</em>
														</span>
									<php>}</php>
									<php>}else{</php>
									<php>if($shop_info['envelope_type']==0){</php>
									<span class="daiyan" style="background: #fbca60;">
															{$shop_info['redenvelope']}&nbsp;
															<em class="daiyan_click">代言红包</em>
														</span>
									<php>}else{</php>
									<span class="daiyan" style="background: #fbca60;">
																	<a href="{:U('shop/index',array('id'=>$shop_info['envelope_product_id']))}" style="line-height: 28px;color: #fff;">{$envelope_product.title}</a>
																<em class="daiyan_click">代言礼品</em>
															</span>
									<php>}</php>

									<php>}</php>


									<a href="{:U('page/index',array('id'=>6))}" class="daiyan_tip" >代言规则</a>
								</div>
							</div>
						</div>
						<php>}</php>
					</div>
					<!-- 销量及评价 _end -->

					<div class="realy-price">

						<div class="now-prices">
							<span class="price">售&nbsp;&nbsp;&nbsp;价</span>
							<strong class="p-price second-color SZY-GOODS-PRICE">￥{$shop_info.price}</strong>
							<php>
								$daiyan_price=get_daiyan_price($shop_info['id']);
								if($daiyan_price){
							</php>
							<span style="color: #ff9100;">抵扣券  ￥{$shop_info.dikouquan}</span>
							<php>}</php>
						</div>

					</div>

				</div>
				<!-- 优惠券 -->
				<php>if($coupons){</php>
				<div class="freight">
					<div class="dt">优惠券</div>
					<div class="dd">
						<div class="post-age">
							<foreach name="coupons" item="v">
								<div id="manzeng" class="dd " style="position:relative;">
									<a class="activity-68 activity_1" data="{$v.coupon_type_id}" href="javascript:;" title="{$v.coupon_name}">{$v.coupon_name}</a>
								</div>
							</foreach>
						</div>
					</div>
				</div>
				<php>}</php>
				<!--代言红包-->
				<php>if($shop_info['xz_num']>0){</php>

				<div class="freight">
					<div class="dt">限&nbsp;&nbsp;&nbsp;购</div>
					<div class="dd">
						<div class="post-age">
							<span>{$shop_info.xz_num}件</span>
						</div>
					</div>
				</div>
				<php>}</php>
				<php>if($shop_info['qp_num']>0){
					$qp_num=$shop_info['qp_num'];
				</php>

				<div class="freight">
					<div class="dt">起拍量</div>
					<div class="dd">
						<div class="post-age">
							<span>{$shop_info.qp_num}件</span>
						</div>
					</div>
				</div>
				<php>}else{
					$qp_num=1;
					}</php>


				<div class="modal-backdrop fade in" style="display: none;"></div>
				<div class="q-type" style="display: none;">
					<div class="q-price"><em>¥</em><strong></strong><span class="q-limit"></span></div>
					<div class="q-line"><i class="i1"></i></div>
					<div class="q-range"></div>
					<div class="q-ops-box">
						<div class="q-opbtns">
							<a href="#none" class="btn btn-def"  data-type=""><b></b><span class="txt">立即领取</span></a>
						</div>
						<div class="q-progress"><span class="progress-wrap"><span class="progress-bg"></span><span class="progress" style="width:0%"></span></span><span class="txt">已抢</span></div>
					</div>

				</div>
				<!-- 服务 -->
				<div class="freight">
					<div class="dt">服&nbsp;&nbsp;&nbsp;务</div>
					<div class="dd">
						<div class="post-age">
							由
							<a href="{:U('store/index',array('id'=>$store_info['id']))}" target="_blank" class="color">{$store_info.title}</a>
							负责发货，并提供售后服务。
						</div>
					</div>
				</div>
				<!-- 运费 -->
				<div class="freight">
					<div class="dt">运&nbsp;&nbsp;&nbsp;费</div>
					<div class="dd">


						<div class="post-age">
							<php>
								if($shop_info['goods_freight']=='0'&&$shop_info['transport_id']=='0'){
								echo "<font style='color: red'>免运费</font>";
								}
								if($shop_info['goods_freight']!='0'&&$shop_info['transport_id']=='0'){
								echo "￥".$shop_info['goods_freight'];
								}
								if($shop_info['transport_id']!='0'){
								echo '运费根据区域,会有所差异,可在下单时查看运费';
								}
							</php>
						</div>
					</div>
				</div>

				<div class="choose">
					<!-- 商品规格 -->
					<php>if($shop_info['shop_sku']['SKU_Style']){</php>
					<dl class="attr" id="yanse">
						<dt class="dt">颜色</dt>
						<dd class="dd">
							<ul>
								<foreach name="shop_info['shop_sku']['SKU_Style']" item="v">
									<!-- 属性值被选中的状态 -->
									<li class="goods-spec-item <eq name='key' value='0'>selected</eq>" data_max_image="{$v.SKU_Img}">
										<a href="javascript:void(0);" title="{$v.modifyValue}">
											<img src="{$v.SKU_ThumbImg_M}" width=30 height=30 alt="" />
											<span class="value-label">{$v.modifyValue}</span>
										</a>
										<i></i>
									</li>
								</foreach>
							</ul>
						</dd>
					</dl>
					<php>}</php>
					<php>if($shop_info['shop_sku']['SKU_Spec']){</php>
					<dl class="attr" id="guige">
						<dt class="dt">规格</dt>
						<dd class="dd">
							<ul>
								<foreach name="shop_info['shop_sku']['SKU_Spec']" item="v">
									<!-- 属性值被选中的状态 -->
									<li class="goods-spec-item <eq name='key' value='0'>selected</eq>">
										<a href="javascript:void(0);" title="{$v.modifyValue}">

											<span class="value-label">{$v.modifyValue}</span>
										</a>
										<i></i>
									</li>
								</foreach>
							</ul>
						</dd>
					</dl>
					<php>}</php>
					<!-- 购买数量 -->
					<dl class="amount">
						<dt class="dt">数&nbsp;&nbsp;&nbsp;量</dt>
						<dd class="dd">
									<span class="amount-widget">
								<input type="text" class="amount-input" value="{$qp_num}" data-amount-min="1" data-amount-max="" maxlength="8" title="请输入购买量">
								<span class="amount-btn">
									<span class="amount-plus">
										<i>+</i>
									</span>
									<span class="amount-minus">
										<i>-</i>
									</span>
									</span>
									<span class="amount-unit">件</span>
									</span>

							<em class="stock">库存{$shop_info.num}件</em>

						</dd>
					</dl>
					<div class="project-introduce">
						<!-- 众筹中等其他状态 -->
						<!-- 非永久 -->
						<div class="p-bar">
							<div style="width:{$crowdfunding_info.percent}%" class="p-bar-green"></div>
						</div>
						<p class="p-progress">
							<span class="fl percent" style="color: rgb(47, 214, 162);">当前进度{$crowdfunding_info.percent}%</span><span class="fr">{$crowdfunding_info.num}名支持者</span>
						</p>

						<p class="p-target" id="projectMessage">
							此项目必须在
							<span class="f_red">{$crowdfunding_info.end_time|strtotime|date="Y",###}年{$crowdfunding_info.end_time|strtotime|date="m",###}月{$crowdfunding_info.end_time|strtotime|date="d",###}日</span>前得到
							<span class="f_red"><i>￥</i>{$crowdfunding_info.total_money}</span>的支持才可成功！
							剩余<span class="f_red"> {$crowdfunding_info.surplus_time}</span>天!</p>

						<!--订阅 end-->
					</div>
					<!-- 加入购物车按钮、手机购买 -->
					<div class="action">
						<input type="hidden" id="shop_id" value="{$shop_info.id}" />
						<!--<php>
							$nowtime=time();
							if($shop_info['tuanselect']==1&&$shop_info['tuanz_endtime']>$nowtime&&$shop_info['tuanz_starttime']<$nowtime){
						</php>-->
						<!--<div class="btn-buy">
							<a href="javascript:void(0);" class="kaituan bg-color"style="color: #fff;">
								<span class="buy-goods-bg bg-color"></span>
								<span class="buy-goods-border"></span><em class="SZY-GOODS-PRICE"></em>&nbsp;立即支持
							</a>
						</div>-->
						<!--<div class="btn-buy">
							<a href="javascript:void(0);" class="kaituan bg-color " style="color: #fff;">
								<em class="SZY-GOODS-PRICE-TUAN">￥{$shop_info.tuan_price} </em>&nbsp;{$shop_info.tuan_num}人开团
							</a>
						</div>-->
						<!--<div class="btn-buy">
							<a href="javascript:void(0);" class="kaituan bg-color"style="color: #fff;">
								<span class="buy-goods-bg bg-color"></span>
								<span class="buy-goods-border"></span> <em class="SZY-GOODS-PRICE"></em>立即支持
							</a>
						</div>-->
						<div class="btn-buy">
							<a href="javascript:void(0);" class="buy-goods bg-color"style="color: #fff;">
								<span class="buy-goods-bg bg-color"></span>
								<span class="buy-goods-border"></span><em class="SZY-GOODS-PRICE"></em>&nbsp;立即支持
							</a>
						</div>
						<!--<php>}else{</php>-->
						<!--<div class="btn-buy">
							<a href="javascript:void(0);" class="kaituan bg-color"style="color: #fff;">
								<span class="buy-goods-bg bg-color"></span>
								<span class="buy-goods-border"></span> 立即支持
							</a>
						</div>-->
						<php>if($shop_info['mian_send']==0){</php>
						<div class="btn-buy">
							<a href="javascript:void(0);" class="buy-goods bg-color"style="color: #fff;">
								<span class="buy-goods-bg bg-color"></span>
								<span class="buy-goods-border"></span><em class="SZY-GOODS-PRICE"></em>&nbsp;立即支持
							</a>
						</div>
						<php>}else{</php>
						<span style="height: 40px;display: block;line-height: 55px;color: #f00;">*免发货请直接购买</span>
						<php>}</php>
						<!--<php>}</php>-->

						<div class="btn-phone">
							<a href="javascript:void(0);" class="go-phone">
								<span>手机购买</span>
								<i></i>
								<div id="phone-tan">
									<span class="arr"></span>
									<div class="m-qrcode-wrap">
										<img src="http://{$_SERVER['HTTP_HOST']}/index/qrcode?url=http://{$_SERVER['HTTP_HOST']}{:U('crowdfunding/details',array('id'=>$_GET['id']))}" width="100" height="100" />
									</div>
								</div>
							</a>
						</div>

					</div>

					<!-- 服务承诺 -->
					<php>if($new_rs_tuan){</php>
					<div id="tuan">
						<p style="padding: 10px 0;">以下小伙伴正在发起团购，您可直接参与</p>
						<ul>
							<foreach name="new_rs_tuan" item="v">
								<php>
									$city_info=getCityInfo($v['buyer_city']);
								</php>

								<li>
									<img src="{$v.user_pic}" class="pic"/>
									<span class="info">{$v.buyer_name}<br/>{$city_info.city_name}</span>
									<span class="ctuan" data="{$v.order_id}" style="cursor: pointer;">
												去参团
											</span>
									<script type="text/javascript">
                                        getCountDown({$v['payment_time']+60*60*24},'time_{$key}');
									</script>
									<span class="info_r">还差{$v.num}人成团<br/><p>剩余<em id="time_{$key}"></em></p></span>
								</li>
							</foreach>

						</ul>
					</div>
					<php>}</php>
				</div>

				<!-- 在售的商品 _end -->

			</form>
		</div>
		<!-- 商品详细信息 _end-->
		<!-- 店铺信息 _star-->
		<div class="store-info">
			<dl class="store-logo">
				<a href="{:U('store/index',array('id'=>$store_info['id']))}" target="_blank">
					<img src="{$store_template_info.logo}" width="" height="" />
				</a>
			</dl>
			<dl class="store-name third-store">
				<a href="{:U('store/index',array('id'=>$store_info['id']))}" target="_blank" class="name">{$store_info.title}</a>

			</dl>

			<dl class="store-score">
				<dd>
					<!-- 通过分数判断width的宽度-->
					<php>
						$zonghe=($store_info['store_desccredit']+$store_info['store_deliverycredit']+$store_info['store_servicecredit'])/3;
					</php>
					<div class="score-sum color">
						{:number_format($zonghe, 2, '.', '')}
						<span>综合</span>
					</div>
					<ul class="score-part">
						<li>
							<span class="score-desc">描述相符</span>
							<span class="score-detail color">{:number_format($store_info['store_desccredit'], 2, '.', '')}</span>
						</li>
						<li>
							<span class="score-desc">服务态度</span>
							<span class="score-detail color">{:number_format($store_info['store_servicecredit'], 2, '.', '')}</span>
						</li>
						<li>
							<span class="score-desc">发货速度</span>
							<span class="score-detail color">{:number_format($store_info['store_deliverycredit'], 2, '.', '')}</span>
						</li>
					</ul>
				</dd>
			</dl>
			<dl class="store-other">
				<dt>所在地：</dt>
				<dd>{$address.Province.province_name} {$address.City.city_name} {$address.District.district_name}</dd>
			</dl>
			<!-- 客服 -->

			<div class="enter-store">
				<div class="enter-store-item">
					<a class="bg-color goto-shop" href="{:U('store/index',array('id'=>$store_info['id']))}" target="_blank">
						<i></i> 进入店铺
					</a>
					<php>if($rsstoreinfo_status==1){</php>
					<a class="bg-color shop-add collect-store" href="javascript:void(0);" store="{$store_info['id']}">
						<i></i>
						<span>已收藏</span>
					</a>
					<php>}else{</php>
					<a class="bg-color shop-add collect-store" href="javascript:void(0);" store="{$store_info['id']}">
						<i></i>
						<span>收藏本店</span>
					</a>
					<php>}</php>
				</div>
			</div>
		</div>
		<!-- 店铺信息 _end-->
	</div>

	<!-- 搭配套餐 -->

	<!-- 内容 -->
	<div class="clearfix">
		<!-- 左半部分内容 -->
		<div class="fl">
			<!-- 客服组 -->

			<div class="store-service">
				<div class="store-logo">
					<img src="__TMPL__Home/Shop/picture/service.png" width="" height="" />
				</div>
				<div class="store-service-group left-content">

					<div class="store-service-type">
						<h4>工作时间</h4>
						<div class="service-time">
							<p>	{:sp_getad('工作时间')}</p>
						</div>
					</div>

				</div>

			</div>

			<!-- 店内分类 -->
			<php>
				$store_type=sp_get_store_menu_tree($store_info['id']);

			</php>
			<div class="store-category" data="{$store_info['id']}">
				<h3 class="left-title">店内分类</h3>
				<div class="left-content tree">
					<ul>
						<foreach name="store_type" item="v">
							<li>
								<span><i class="icon-minus-sign"></i></span>
								<a href="{:U('shop/type',array('id'=>$vo['id']))}" target="_self" title="{$v.label}" class="tree-first">{$v.label}</a>
								<ul>
									<foreach name="v['child']" item="vo">
										<li>
											<span><i class="arrow"></i></span>
											<a href="{:U('shop/type',array('id'=>$vo['id']))}" target="_self" title="{$vo.label}">{$vo.label}</a>
										</li>
									</foreach>
								</ul>
							</li>
						</foreach>
					</ul>
				</div>
			</div>

			<!-- 排行榜 -->

			<div class="store-rank-list">
				<h3 class="left-title">店内排行榜</h3>
				<div class="left-content rank-list">
					<ul class="tab-nav j-tab-nav">
						<li class="current">销售量</li>
						<li>关注量</li>
					</ul>
					<div class="tab-con">
						<div class="j-tab-con">
							<ul class="goods-list" style="display: block">
								<foreach name="sale_num" item="v">
									<li class="goods-item first">
										<div class="picture">
											<a href="{:U('crowdfunding/details',array('id'=>$v['id']))}" title=" {$v.title} ">
												<img src="{$v.image}">
											</a>
										</div>
										<div class="price">
											<a href="{:U('crowdfunding/details',array('id'=>$v['id']))}" title="{$v.title} "> {$v.title} </a>
											<span class="color">￥{$v.price}</span>
										</div>
									</li>
								</foreach>
							</ul>
							<ul class="goods-list">

								<foreach name="click_num" item="v">
									<li class="goods-item first">
										<div class="picture">
											<a href="{:U('crowdfunding/details',array('id'=>$v['id']))}" title=" {$v.title} ">
												<img src="{$v.image}">
											</a>
										</div>
										<div class="price">
											<a href="{:U('crowdfunding/details',array('id'=>$v['id']))}" title="{$v.title} "> {$v.title} </a>
											<span class="color">￥{$v.price}</span>
										</div>
									</li>
								</foreach>

							</ul>
						</div>
					</div>
				</div>
			</div>

			<!-- 您浏览过 -->

		</div>
		<!-- 右半部分内容 -->
		<div class="right right-con">
			<div class="wrapper">
				<div id="main-nav-holder" class="goods-detail">
					<ul id="nav" class="tab">
						<li class="title-list current">
							<a href="javascript:;">规格参数</a>
						</li>
						<li class="title-list">
							<a href="javascript:;">商品详情</a>
						</li>
						<li class="title-list evaluate_auto">
							<a id="evaluate_count" href="javascript:;">累计评价({$shop_info.evaluation_count})</a>
						</li>

						<li class="title-list">
							<a href="javascript:;">服务保障</a>
						</li>

					</ul>
					<div class="right-side">
						<!-- 失效不展示 -->

						<a href="javascript:void(0);" class="right-addcart add-cart " id="right-addcart">
							<i></i> 加入购物车
						</a>

						<div class="right-side-con">
							<ul class="right-side-ul">
								<li class="abs-active">
									<i></i>
									<span>规格参数</span>
								</li>
								<li>
									<i></i>
									<span>商品详情</span>
								</li>
								<li>
									<i></i>
									<span>商品评价</span>
								</li>

								<li>
									<i></i>
									<span>常见问题</span>
								</li>

							</ul>
						</div>
					</div>
				</div>
				<div id="main_widget_1">
					<!-- 规格参数 _star -->
					<div id="goods_attr_list" class="goods-detail-con goods-detail-tabs">
						<ul class="goods-spec">
							<foreach name="shop_content_info['config']" item="v">
								<li>
									{$v.title}：
									<span id="goods_attr_goods_name" title="{$v.content}" class="goods-attr-value">{$v.content|default='其他'}</span>
								</li>
							</foreach>
						</ul>
					</div>
					<!-- 规格参数 _end -->
					<!-- 商品详情 _star -->
					<div id="goods_introduce" class="goods-detail-con goods-detail-tabs">
						<!-- 商品后台上传的商品描述 -->
						<div class="detail-content goods-detail-content">
							{$shop_content_info.content}
						</div>
					</div>
					<!-- 商品详情 end -->
					<!-- 售后保障 start -->
					<php>
						$page=get_page(30);
					</php>
					<div style="width: 798px;border: 1px solid #e5e5e5;margin: 8px 0;padding: 10px;line-height: 25px;">
						{$page.post_content|htmlspecialchars_decode}
					</div>
					<!-- 售后保障 end -->
					<!-- 商品评价 start -->
					<div id="goods_evaluate" class="goods-detail-con goods-detail-tabs">
						<div class="evaluate">
							<h3 class="color">商品评价</h3>
							<div class="comment-mod">
								<div class="comment-grade">
									<div class="rate-score">

										<h4>宝贝与描述相符</h4>
										<strong>{:number_format($shop_info['evaluation_good_star'],2)}</strong>
										<p>
													<span class="score-value-no">
														<em style="width: {$shop_info['evaluation_good_star']/5*100}%;"></em>
													</span>
										</p>
									</div>
									<div class="rate-graph">
										<div class="graph-scroller">
													<span style="width: {$shop_info['evaluation_good_star']/5*100}%;">
														<em>
															{:number_format($shop_info['evaluation_good_star'],2)}
															<i>▼</i>
														</em>
													</span>
										</div>
										<ul class="graph-desc">
											<li>非常不满</li>
											<li>不满意</li>
											<li>一般</li>
											<li>满意</li>
											<li>非常满意</li>
										</ul>
									</div>
									<!--   -->
								</div>
								<php>$datatype=session('datatype');</php>
								<div class="comment-type">
									<ul class="tab-nav">
										<li <eq name='datatype' value='0'>class="current"</eq>>
										<a href="{:U('crowdfunding/details',array('id'=>$_GET['id'],'datatype'=>0))}">
											<i class="icon  <eq name='datatype' value='0'>cur</eq>"></i> 全部
										</a>
										</li>
										<li <eq name="datatype" value="1">class="current"</eq>>
										<a href="{:U('crowdfunding/details',array('id'=>$_GET['id'],'datatype'=>1))}">
											<i class="icon <eq name='datatype' value='1'>cur</eq>"></i> 图片
											<em>（{$img_evaluate_count}）</em>
										</a>
										</li>
										<li <eq name="datatype" value="2">class="current"</eq>>
										<a href="{:U('crowdfunding/details',array('id'=>$_GET['id'],'datatype'=>2))}">
											<i class="icon <eq name='datatype' value='2'>cur</eq>"></i> 好评
											<em>（{$good_evaluate_count}）</em>
										</a>
										</li>
										<li <eq name="datatype" value="3">class="current"</eq>>
										<a href="{:U('crowdfunding/details',array('id'=>$_GET['id'],'datatype'=>3))}">
											<i class="icon <eq name='datatype' value='3'>cur</eq>"></i> 中评
											<em>（{$zhong_evaluate_count}）</em>
										</a>
										</li>
										<li <eq name="datatype" value="4">class="current"</eq>>
										<a href="{:U('crowdfunding/details',array('id'=>$_GET['id'],'datatype'=>4))}">
											<i class="icon <eq name='datatype' value='4'>cur</eq>"></i> 差评
											<em>（{$bad_evaluate_count}）</em>
										</a>
										</li>
									</ul>
								</div>
								<!-- 有评论的的展示形式 _star -->
								<empty name="evaluate_list">
									<div id="comment_content" style="height: 250px;">

										<div class="tip-box">
											<img src="/themes/wnsc/Home/List/images/noresult.png" class="tip-icon">
											<div class="tip-text">没有评价哦</div>
										</div>

									</div>
								</empty>
								<notempty name="evaluate_list">
									<div id="comment_content">
										<div class="comment-con tablelist">
											<foreach name="evaluate_list" item="v">
												<php>$user_info=get_user_info($v['uid']);</php>
												<div class="goods-comment">
													<div class="user-info">
														<div class="face"><img src="{$user_info.user_pic}"></div>
														<php>
															$v['member_name']=yc_phone($v['member_name']);
															if($v['is_anonymous']==1){
															$v['member_name']='***【匿名】';
															}
														</php>
														<div class="name-box">
															<em>{$v.member_name}</em>
														</div>
													</div>
													<dl>
														<dd class="goods-comment-con"><span class="text">{$v.content}</span></dd>
														<php>$img_array=explode(',',$v['image']);</php>
														<notempty	name="img_array[0]">
															<dd class="goods-comment-imgs">
																<foreach name="img_array" item="vo">
																	<img src="{$vo}" alt="">
																</foreach>
															</dd>
														</notempty>
														<dd class="photo-viewer"></dd>
														<dd>
															<div class="date"><span>{:date('Y-m-d H:i:s',$v['addtime'])}</span> <span></span></div>
														</dd>
													</dl>
													<notempty name="v.explain_first">
														<div class="comment_zhuijia">店家回复：</div>
														<dl style="min-height: 20px;">
															<dd class="goods-comment-con"><span class="text">{$v.explain_first}</span></dd>
														</dl>
													</notempty>
													<notempty name="v.again_content">
														<div class="comment_zhuijia">追加评价：</div>
														<dl>
															<dd class="goods-comment-con"><span class="text">{$v.again_content}</span></dd>
															<php>$img_array=explode(',',$v['again_image']);</php>
															<notempty name="img_array[0]">
																<dd class="goods-comment-imgs">
																	<foreach name="img_array" item="vo">
																		<img src="{$vo}" alt="">
																	</foreach>
																</dd>
															</notempty>
															<dd class="photo-viewer"></dd>
															<dd>
																<div class="date"><span>{:date('Y-m-d H:i:s',$v['again_addtime'])}</span> <span></span></div>
															</dd>
														</dl>
													</notempty>
													<notempty name="v.again_explain">
														<div class="comment_zhuijia">店家回复：</div>
														<dl style="min-height: 20px;">
															<dd class="goods-comment-con"><span class="text">{$v.again_explain}</span></dd>
														</dl>
													</notempty>
												</div>
											</foreach>
										</div>
									</div>
									<div id="pagination" class="page">
										<div class="page-wrap fr">
											<div class="total">共<span id="totalcount">{$evaluate_count}</span>条</div>
										</div>
										<style>
											.page-num .next {
												margin-left: 0;
											}

											.page-num a {
												float: left;
												text-align: center;
												border: 1px solid #eee;
												height: 35px;
												line-height: 35px;
												margin-right: 4px;
											}

											.page-num span {
												float: left;
												text-align: center;
												height: 37px;
												line-height: 37px;
												width: 37px;
												margin-right: 4px;
												background: red;
												color: #fff;
											}
										</style>
										<div class="page-num fr">
											{$evaluate_page}
										</div>
									</div>
								</notempty>
							</div>
						</div>

					</div>
					<!-- 商品评价 end -->

					<!-- 服务 start -->

					<!-- 常见问题 _star -->
					<div id="common_problem" class="goods-detail-con goods-detail-tabs">
						<div class="wenti">
							<div class="tab-title">
								<span class="color">常见问题</span>
							</div>
							<div class="tab-body cj_que" >
							</div>
						</div>
					</div>
					<!-- 常见问题 _end -->
					<!-- 服务 end -->

				</div>
			</div>
		</div>
	</div>
</div>

<!-- 站点底部-->

<tc_include file="Public:footer" />
<tc_include file="Public:right" />
<script type="text/javascript" src="__TMPL__Home/Shop/js/jquery.widget.js"></script>
<script type="text/javascript" src="__TMPL__Home/List/js/cart.js"></script>
<!-- 头部右侧鼠标经过图片放大效果 _start -->
<script type="text/javascript" src="__TMPL__Home/Shop/js/bubbleup.js"></script>
<!-- 头部右侧鼠标经过图片放大效果 _end -->
<!-- 套餐、店内排行等左右切换效果 _start-->
<script type="text/javascript" src="__TMPL__Home/Shop/js/tabs.js"></script>
<!-- 套餐、店内排行等左右切换效果 _end -->
<!-- 右侧商品信息等定位切换效果 _start -->
<script type="text/javascript" src="__TMPL__Home/Shop/js/tabs_totop.js"></script>
<!-- 右侧商品信息等定位切换效果 _end -->
<!-- 放大镜 _start -->
<script type="text/javascript" src="__TMPL__Home/Shop/js/magiczoom.js"></script>
<!-- 放大镜 _end -->
<!-- 控制图片经过放大 -->
<script type="text/javascript" src="__TMPL__Home/Shop/js/goods.js"></script>

<script type="text/javascript" src="__TMPL__Home/Shop/js/jquery.lazyload.js"></script>
<script type="text/javascript" charset="utf-8">
    //
    //		  $(function() {
    //
    //		      $(".goods-detail-content img").lazyload({effect: "fadeIn"});
    //
    //		  });

    jQuery(document).ready(function ($) {
        $("img.lazy").lazyload();
    });


</script>


<script id="SZY_SKU_IMAGES" type="text">
			{$arr_img}
		</script>
<script type="text/javascript">
    // 图片相册
    $(".goodsgallery").goodsgallery({
        images: $.parseJSON($("#SZY_SKU_IMAGES").html())
    });

    $(function() {
    <php>if($daiyan_rs==1){</php>
            layer.msg('抵扣券领取成功，可去个人中心->券包 中查看');
        <php>}</php>
        get_question();
        sku_price();
        $('.goods-spec-item').click(function() {
            var data_max_image = $(this).attr('data_max_image');
            $('.MagicZoom').attr("href", data_max_image);
            $('.MagicZoom img').attr("src", data_max_image);

        })
        $('.daiyan_tip').mouseover(function(){
            layer.tips('什么是代言？', '.daiyan_tip', {
                tips: [2, '#000'],
                time: 0,

            });
        })
        $(".daiyan_tip").mouseout(function () {
            layer.closeAll();
        });
        $('.activity_1').click(function() {
            var data_id=$(this).attr('data');
            $.post('/shop/get_coupons', {
                id: data_id,
            }, function(result) {
                $('.q-price strong').html(result.money)
                if(result.at_least=='0.00'){
                    $('.q-price .q-limit').html('')
                }else{
                    $('.q-price .q-limit').html('满'+result.at_least+'可用');
                }
                $('.q-type .q-range').html(result.coupon_name);
                $('.q-progress .txt').html('已抢'+result.baifen+'%');
                $('.q-progress .progress').width(result.baifen+'%');
                $(".q-ops-box .q-opbtns .btn-def").attr("data-type",result.coupon_type_id);
                if(result.lq==1){
                    $('.q-opbtns .txt').html('已领取优惠券');
                }
                $('.q-type').show();
                $('.modal-backdrop').show();

            }, "json");
        })
        $('.q-ops-box .q-opbtns .btn-def').click(function() {
            var btn_def=$('.q-ops-box .q-opbtns .btn-def').attr('data-type');
            $.post('/shop/get_coupons_save', {
                id: btn_def,
            }, function(result) {
                layer.msg(result.message);
                if(result.code==0){
                    setTimeout("window.location.href='/user/login.html'",1000);
                }
                if(result.code==1||result.code==2||result.code==3){
                    $('.modal-backdrop').hide();
                    $('.q-type').hide();
                }


            }, "json");
        })
        $('.modal-backdrop').click(function() {
            $('.modal-backdrop').hide();
            $('.q-type').hide();
        })
        $('.collect-goods').click(function() {
            var shop_id = $(this).attr('data-goods-id');
            $.post('/user/collect', {
                id: shop_id,
                type: 1,
            }, function(result) {
                if(result.code == 1) {
                    layer.msg(result.message);
                    $('.collect-goods').removeClass('goods-col');
                    $('.collect-goods').addClass('goods-col2');
                    $('.collect-goods span').html('已收藏');
                } else {
                    layer.msg(result.message);
                }
            }, "json");

        });
        $('.collect-store').click(function() {
            var store_id = $(this).attr('store');
            $.post('/user/collect', {
                id: store_id,
                type: 2,
            }, function(result) {
                if(result.code == 1) {
                    layer.msg(result.message);

                    $('.collect-store span').html('已收藏');
                } else {
                    layer.msg(result.message);
                }
            }, "json");

        });

        $('.add-cart').click(function() {
            var id = $('#shop_id').val();
            var yanse = $('#yanse .selected .value-label').text();
            var guige = $('#guige .selected .value-label').text();
            var num = $('.amount-input').val();

            $.post('/cart/add_cart', {
                id: id,
                yanse: yanse,
                guige: guige,
                num: num,
                type:0,

            }, function(result) {
                if(result.code == 1) {
                    layer.msg('成功加入购物车！');
                    get_cart_info();
                }
            }, "json");

        })
        $('.buy-goods').click(function() {
            var id = $('#shop_id').val();
            var yanse = $('#yanse .selected .value-label').text();
            var guige = $('#guige .selected .value-label').text();
            var num = $('.amount-input').val();

            $.post('/cart/add_cart', {
                id: id,
                yanse: yanse,
                guige: guige,
                num: num,
                type:0,
                buygood:1,

            }, function(result) {
                if(result.code == 1) {
                    buy_now();
                }else{
                    layer.msg(result.message);
                }
            }, "json");

        })
        <php>$uid=session('user_id');</php>
        $('.kaituan').click(function() {
            var uid='{$uid}';
            if(uid){
                var id = $('#shop_id').val();
                var yanse = $('#yanse .selected .value-label').text();
                var guige = $('#guige .selected .value-label').text();
                var num = $('.amount-input').val();
                $.post('/cart/add_cart', {
                    id: id,
                    yanse: yanse,
                    guige: guige,
                    num: num,
                    type:1,
                    buygood:1,
                }, function(result) {
                    if(result.code == 1) {
                        buy_now();
                    }else{
                        layer.msg(result.message);
                    }
                }, "json");
            }else{
                self.location = '/user/login';
            }
        })

        $('.ctuan').click(function() {
            var uid='{$uid}';
            var ctuan_id=$(this).attr('data');

            if(uid){
                var id = $('#shop_id').val();
                var yanse = $('#yanse .selected .value-label').text();
                var guige = $('#guige .selected .value-label').text();
                var num = $('.amount-input').val();
                $.post('/cart/add_cart', {
                    id: id,
                    yanse: yanse,
                    guige: guige,
                    num: num,
                    ctuan_id:ctuan_id,
                    type:1,
                    buygood:1,
                }, function(result) {
                    if(result.code == 1) {
                        buy_now();
                    }else{
                        layer.msg(result.message);
                    }
                }, "json");
            }else{
                self.location = '/user/login';
            }
        })



    })

    function buy_now() {
        $.post('/pay/buy_now', {}, function(result) {
            if(result.code == 1) {
                self.location = '/pay/paymentOrder';
            }
            if(result.code == 2) {
                self.location = '/user/login';
            }
            if(result.code == 3) {
                layer.msg('网络出现问题请检查！');
            }
        }, "json");
    }

    function get_question(){
        $.post('/shop/get_question', {}, function(result) {
            if(result.code == 1) {
                $('.cj_que').html(result.data)
            }

        }, "json");
    }
    $('.goods-comment-imgs>img').click(function() {
        var even = $(this);
        var viewer = even.parent().next('.photo-viewer');
        if(!even.is('.cur')) {
            even.parent().children('img').removeClass('cur');
            even.addClass('cur');
            even.parent().next('.photo-viewer').html('<img src="' + $(this).attr('src') + '"/>').show('fast');
        } else {
            even.removeClass('cur');
            even.parent().next('.photo-viewer').hide("slow").html('');
        }
    })
</script>
<php>if($_GET['p']!=null||$datatype>0){</php>
<script type="text/javascript">
    $(function() {
        $("html, body").scrollTop(0).animate({
            scrollTop: $("#goods_evaluate").offset().top
        });
    })
</script>
<php>}</php>
<script type="text/javascript">
    //固定滚动条位置
    $.fixedScorll.read("SZY_GOODS_SCORLL");

    $().ready(function() {

        var desc_container = $(".goods-detail-content");
        var evaluate_container = $("#goods_evaluate");

        function load() {

            // 加载商品详情
            if(!$("body").data("loading-goods-desc")) {
                // 计算高度
                if($(document).scrollTop() >= $(desc_container).offset().top - $(window).height()) {
                    $("body").data("loading-goods-desc", true);

                }
            }
            // 评论
            if(!$("body").data("loading-goods-comment")) {
                // 计算高度
                if($(document).scrollTop() >= $(evaluate_container).offset().top - $(window).height()) {
                    $("body").data("loading-goods-comment", true);
                    //							$.get('/goods/comment.html', {
                    //								sku_id: "202",
                    //								output: 1
                    //							}, function(result) {
                    //								if(result.code == 0) {
                    //									$(evaluate_container).html(result.data);
                    //								}
                    //							}, "json");
                }
            }
        }

        load();

        // 加载商品详情和评论
        $(window).scroll(function() {
            load();
        });
    <php>$status=get_crowdfunding_daiyan($shop_info['id']);</php>
        $('.daiyan_click').click(function(){
        <php>if(session('user_id')){</php>
            <php>if($status){</php>
                $('.mark').show();
                $('.share-dialog').show();
            <php>}else{</php>
                layer.msg('您只能购买之后才可代言！');
            <php>}</php>
            <php>}else{</php>
                layer.msg('未登录！');
                setTimeout("self.location = '/user/login';",1000);
            <php>}</php>
        })
        $('.mark').click(function(){
            $('.mark').hide();
            $('.share-dialog').hide();
        })
        $('.share-close').click(function(){
            $('.mark').hide();
            $('.share-dialog').hide();
        })


    });

    function sku_price(){
        var sku={:json_encode($shop_info['shop_sku']['SKU_Form'])};
        if($("#yanse").length>0){
            var yanse=$('#yanse .selected .value-label').html();
        }else{
            var yanse='';
        }
        if($("#guige").length>0){
            var guige=$('#guige .selected .value-label').html();
        }else{
            var guige='';
        }
        if(yanse!=''||guige!=''){

            $.each(sku,function(key,value){

                if(value.sku_style==yanse&&value.sku_spec==guige){
                    sj_price=toDecimal2(value.sku_price);
                    tuan_price=toDecimal2(value.sku_price_tuan);
                    $('.SZY-GOODS-PRICE').html('￥'+sj_price);
                    if(tuan_price){
                        $('.SZY-GOODS-PRICE-TUAN').html('￥'+tuan_price);
                    }
                    $('.stock').html('库存'+value.sku_stock+'件');
                    return;
                }
            })
        }


    }
    function toDecimal2(x) {
        var f = parseFloat(x);
        if (isNaN(f)) {
            return false;
        }
        var f = Math.round(x*100)/100;
        var s = f.toString();
        var rs = s.indexOf('.');
        if (rs < 0) {
            rs = s.length;
            s += '.';
        }
        while (s.length <= rs + 2) {
            s += '0';
        }
        return s;
    }
</script>
<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/Shop/css/share.css"/>
<div class="mark" style="display: none;"></div>
<div class="share-dialog" style="display: none;">
	<div class="share-close"></div>
	<div class="share-dialog-title">分享</div>
	<div class="share-dialog-cont">
		<div class="share-copy">
			<div class="share-copy-l">分享链接：</div>
			<div class="share-copy-c"><input id="copytext" type="text"/></div>
			<div id="btnCopy" class="share-copy-r"  data-clipboard-target="copytext">复制链接</div>
			<div class="clear"></div>
		</div>
		<div class="share-platform">
			<div class="share-platform-l">社交平台：</div>
			<div class="share-platform-r">
				<div class="bdsharebuttonbox">
					<a href="#" id="share-qrcode" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
					<a href="#" id="share-sina" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
					<a href="#" id="share-qq" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
					<a href="#" id="share-qzone" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
				</div>
				<div class="share-platform-text">
					您可以直接复制短链，分享给朋友，也可直接点击社交平台图标，指定分享。
				</div>
			</div>
		</div>
	</div>
</div>
<script>
    var g_url = "http://{$_SERVER['SERVER_NAME']}{:U('crowdfunding/details',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}";

</script>

<!--<script type="text/javascript">
            window._bd_share_config={
    "common":{
        "bdSnsKey":{},
        "bdText":"我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~",
        "bdMini":"1",
        "bdUrl":g_url,
        "bdMiniList":["bdxc","tqf","douban","bdhome","sqq","thx","ibaidu","meilishuo","mogujie","diandian","huaban","duitang","hx","fx","youdao","sdo","qingbiji","people","xinhua","mail","isohu","yaolan","wealink","ty","iguba","fbook","twi","linkedin","h163","evernotecn","copy","print"],
        "bdPic":"http://{$_SERVER['SERVER_NAME']}{$shop_info.image}",
        "bdStyle":"1",
        "bdSize":"32"},
        "share":{}
        };
        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>-->
<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/Shop/css/share_style.css"/>
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="/themes/wnsc/Home/Shop/js/jsmodern-1.1.1.min.js"></script>

<script type="text/javascript">
    jsModern.share({
        qrcode: "#share-qrcode",
        douban: "#share-douban",
        qzone: "#share-qzone",
        sina: "#share-sina",
        qq: "#share-qq",
        bdText:"我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~",
        bdUrl:g_url,
        bdPic:"http://{$_SERVER['SERVER_NAME']}{$shop_info.image}",
    });
</script>



<script src="/themes/wnsc/Home/Shop/css/ZeroClipboard.js"></script>
<script>

    $('.share-copy-c input').val(g_url);

    var clip = new ZeroClipboard( document.getElementById("btnCopy"),{
        moviePath: '/themes/wnsc/Home/Shop/css/ZeroClipboard.swf'
    });
    clip.on('ready', function(){
        this.on('aftercopy', function(event){
            layer.msg('已经复制剪贴板');
        });
    });


</script>
</body>

</html>